package main

import (
	"cooke-home/gateway-service/config"
	"log"
)

func main() {
	// 初始化 Consul
	config.InitConsul("localhost:18500") // 根据你的 Consul 地址调整
	config.InitRoute()
	startServer()
}

func startServer() {
	log.Println("Gateway starting on :8800")
	if err := config.Router.Run(":8800"); err != nil {
		log.Fatal("Gateway failed to start:", err)
	}
}
